package com.shrct.businessprocess.customerservice.events;

import com.shrct.businessprocess.customerservice.RCFaultWorkItem;
import com.shrct.businessprocess.customerservice.events.RCFaultWorkItemEventsListener;
import edu.fudan.mylang.pf.event.EntityEventsManager;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.customerservice.events.RCFaultWorkItemEventsManager")
public class RCFaultWorkItemEventsManager extends EntityEventsManager<RCFaultWorkItem> {
  @Autowired(required = false)
  private Collection<RCFaultWorkItemEventsListener> listeners = com.google.common.collect.Lists.newArrayList();;
  
  protected Collection<RCFaultWorkItemEventsListener> getListeners() {
    return listeners;
  }
  
  public void fireAccept(final RCFaultWorkItem entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCFaultWorkItemEventsListener)listener).accept(entity);
    }
    
  }
  
  public void fireFinish(final RCFaultWorkItem entity) {
    for (edu.fudan.mylang.pf.event.IEntityEventsListner<?> listener : listeners) {
    	((RCFaultWorkItemEventsListener)listener).finish(entity);
    }
    
  }
}
